package HomeWork;

public class Test04 {
    public static void main(String[] args) {
        Teacher teacher=new Teacher("a",60,"java高阶");
        Student2 student =new Student2();
        student.setAge(20);
        student.setContent("java基础");
        student.setName("b");
        teacher.eat();
        teacher.talk();
        student.eat();
        student.study();
    }
}
class Teacher{
    private String name;
    private int age;
    private String content;

    public void eat(){
        System.out.println("年龄为"+age+"的"+name+"老师正在吃饭....");
    }
    public void talk(){
        System.out.println("年龄为"+age+"的"+name+"老师正在亢奋的讲着"+content+"的知识........");
    }

    public Teacher() {
    }

    public Teacher(String name, int age, String content) {
        this.name = name;
        this.age = age;
        this.content = content;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}
class Student2{
    private String name;
    private int age;
    private String content;

    public void eat(){
        System.out.println("年龄为"+age+"的"+name+"同学正在吃饭....");
    }
    public void study(){
        System.out.println("年龄为"+age+"的"+name+"同学正在专心致志的听着"+content+"的知识....");
    }

    public Student2() {
    }

    public Student2(String name, int age, String content) {
        this.name = name;
        this.age = age;
        this.content = content;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}